package com.itheima.health.dao;

import org.apache.ibatis.annotations.Mapper;
import com.itheima.health.pojo.entity.Member;

import java.time.LocalDate;

@Mapper
public interface MemberDao {
    /**
     * 按月统计当月会员总数
     *
     * @param date
     * @return
     */
    Integer getByMemberLT(LocalDate date);

    /**
     *
     * @param date
     * @param dateBefore
     * @return
     */
    Integer getByRegTime(LocalDate date, LocalDate dateBefore);

    /**
     *
     * @param date
     * @return
     */
    Integer getByNow(LocalDate date);


    /**
     * 获取总会员数
     * @return
     */
    Integer getTotal();
    /**
     * 根据手机号查询用户
     * @param telephone
     * @return
     */
    Member selectMemberByTelephone(String telephone);

    /**
     * 添加会员
     * @param member
     */
    void add(Member member);

    /**
     * 根据id查询会员
     *
     * @param id
     * @return
     */
    Member selectById(Integer id);

}
